from django.conf.urls import url
from . import views


urlpatterns = [
    url(r'categories/(?P<category_id>\d+)/hotskus/$', views.HotSkuListView.as_view()),
    url(r'categories/(?P<category_id>\d+)/skus/$', views.SkuListView.as_view()),
    # url(r'search/$', views.SKUSearchViewSet.as_view({"get": "list"})),
    # url(r'search/$', views.SKUSearchViewSet.as_view({"get": "retrieve"})),
]


from rest_framework.routers import DefaultRouter

# es路由
router = DefaultRouter()

router.register('search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls
